---
image: /generated/articles-docs-studio-reevaluate-composition.png
title: reevaluateComposition()
crumb: "@remotion/studio"
---

# reevaluateComposition()<AvailableFrom v="4.0.167"/>

Re-runs [`calculateMetadata()`](/docs/calculate-metadata) on the currently selected composition.  
This is useful if the function relies on:

- The `public/` folder
- Randomness
- Changing network resources
- Time

## Example

```tsx twoslash title="Re-run calculateMetadata() on the currently selected composition"
import React, { useCallback } from "react";
import { reevaluateComposition } from "@remotion/studio";

export const ReevaluateCompositionComp: React.FC = () => {
  const reevaluate = useCallback(async () => {
    reevaluateComposition();

    console.log("Re-evaluated!");
  }, []);

  return <button onClick={reevaluate}>Re-evaluate</button>;
};
```

## See also

- [Source code for this function](https://github.com/remotion-dev/remotion/blob/main/packages/studio/src/api/reevaluate-composition.ts)
- [`calculateMetadata()`](/docs/calculate-metadata)
